package objects;

import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics2D;

public class Square {

	int xPos = 0;
	int yPos = 0;
	int width = 0;
	int height = 0;
	Color squareColor = new Color(0, 0, 0);
	
	public Square(int x, int y, int width, int height, Color squareColor){
		xPos = x;
		yPos = y;
		this.width = width;
		this.height = height;
		this.squareColor = squareColor;
	}
	
	public Graphics2D paint(Graphics2D g){
		g.setColor(squareColor);
		g.fillRect(xPos, yPos, width, height);
		return g;
	}
	
	public Graphics2D clear(Graphics2D g, Color backgroundColor){
		g.setColor(backgroundColor);
		g.fillRect(xPos, yPos, width, height);
		return g;
	}

	public int getxPos() {
		return xPos;
	}

	public void setxPos(int xPos) {
		this.xPos = xPos;
	}

	public int getyPos() {
		return yPos;
	}

	public void setyPos(int yPos) {
		this.yPos = yPos;
	}

	public int getWidth() {
		return width;
	}

	public void setWidth(int width) {
		this.width = width;
	}

	public int getHeight() {
		return height;
	}

	public void setHeight(int height) {
		this.height = height;
	}

	public Color getSquareColor() {
		return squareColor;
	}

	public void setSquareColor(Color squareColor) {
		this.squareColor = squareColor;
	}
}
